package com.wowangz.cms.systemmanage.datadictionary.service;

import java.util.HashMap;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.wowangz.cms.syscore.exception.ServiceException;
import com.wowangz.cms.syscore.service.BaseService;
import com.wowangz.cms.systemmanage.datadictionary.entity.CfgDataDictValue;

public class CfgDataDictService extends BaseService {

	private Logger logger = LoggerFactory.getLogger(CfgDataDictService.class);

	/**
	 * 分页查询总条数
	 * 
	 * @param map
	 * @return
	 */
	public long findCfgDataDictCount(HashMap<String, Object> map) throws ServiceException {
		Long countNum = this.getSqlSession().selectOne("CfgDataDict.queryCfgDataDictCount", map);
		return countNum;
	}

	/**
	 * 查询记录集合
	 * 
	 * @param map
	 * @return
	 */
	public List<CfgDataDictValue> findCfgDataDictList(HashMap<String, Object> map) throws ServiceException {
		List<CfgDataDictValue> list = this.getSqlSession().selectList("CfgDataDict.queryCfgDataDictSql", map);
		return list;
	}
	
	/**
	 * 根据数据字典类型查询列表
	 * 
	 * @param map
	 * @return
	 */
	public List<CfgDataDictValue> findCfgDataDictListByType(HashMap<String, Object> map) throws ServiceException {
		List<CfgDataDictValue> list = this.getSqlSession().selectList("CfgDataDict.queryCfgDataDictListByType", map);
		return list;
	}
	
	
}
